package lumis.portal.principal.importprincipal;

import lumis.portal.PortalException;
import lumis.portal.authentication.SessionConfig;
import lumis.util.ITransaction;

/**
 * Interface for principal import operations.
 * 
 *
 * @version $Revision: 11633 $ $Date: 2010-06-08 16:44:57 -0300 (Tue, 08 Jun 2010) $
 * @since 4.0.8
 */
public interface IImportPrincipalManager
{
	/**
	 * Read xml config file initializing the declared readers building a xml file with the users and groups extracted by the users.
	 * @param sessionConfig
	 * @param principalReaderConfigId
	 * @param transaction
	 * @throws PortalException
	 * @since 4.0.8
	 */
	public void readPrincipals(SessionConfig sessionConfig, String principalReaderConfigId, ITransaction transaction) throws PortalException;
	
	/**
	 * Read a xml file with user's and group's configuration and import them to Lumis database.
	 * 
	 * @param sessionConfig
	 * @param principalWriterConfigId
	 * @param transaction
	 * @throws PortalException
	 * @since 4.0.8
	 */
	public void writePrincipals(SessionConfig sessionConfig, String principalWriterConfigId, ITransaction transaction) throws PortalException;
}
